import request from '@/utils/request'


import {baseUrlConfig} from "@/config/config";
const basePath = baseUrlConfig.businessBaseUrl;
//获取分页列表
export const inventoryPageList = (data: any) => {
  return request({
    url: basePath + '/tcdmSecureHazardList/findPage',
    method: 'post',
    data
  })
}

//获取统计数据
export const inventoryTrend = (data: any) => {
  return request({
    url: basePath + '/secure/early/trend',
    method: 'post',
    data
  })
}

//获取处理状态
export const getEarlyState=()=>{
  return request({
    url:basePath+'/tcdmSecureHandleStat/findStat',
    method:'get'
  })
}

// 获取隐患类型list
export const earlyTypeList = (data: any) => {
  return request({
    url: basePath + '/secure/assessRule/find',
    method: 'post',
    data
  })
}
// 新增隐患
export const appendInventory = (data: any) => {
  return request({
    url: basePath + '/secure/early/append',
    method: 'post',
    data
  })
}
// 修改隐患
export const updateInventory = (data: any) => {
  return request({
    url: basePath + '/secure/early/update',
    method: 'post',
    data
  })
}
// 删除隐患
export const deleteInventory = (data: any) => {
  return request({
    url: basePath + '/secure/early/delete',
    method: 'post',
    data
  })
}
